<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/9/23
  Time: 17:20
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>DouPHP 管理中心 - 文章列表 </title>
    <meta name="Copyright" content="Douco Design." />
    <link href="css/public.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/global.js"></script>
    <script type="text/javascript" src="js/jquery.autotextarea.js"></script>
</head>
<body>
<div id="dcWrap">
    <div id="dcHead">
        <div id="head">
            <div class="logo"><a href="index.jsp"><img src="images/dclogo.gif" alt="logo"></a></div>
            <div class="nav">
                <ul>
                    <li class="M"><a href="JavaScript:void(0);" class="topAdd">新建</a>
                        <div class="drop mTopad"><a href="product.php?rec=add">商品</a> <a href="article.php?rec=add">文章</a> <a href="nav.php?rec=add">自定义导航</a> <a href="show.html">首页幻灯</a> <a href="page.php?rec=add">单页面</a> <a href="manager.php?rec=add">管理员</a> <a href="link.html"></a> </div>
                    </li>
                    <li><a href="../index.php" target="_blank">查看站点</a></li>
                    <li><a href="index.php?rec=clear_cache">清除缓存</a></li>
                    <li><a href="http://help.douco.com" target="_blank">帮助</a></li>
                    <li class="noRight"><a href="module.html">DouPHP+</a></li>
                </ul>
                <ul class="navRight">
                    <li class="M noLeft"><a href="JavaScript:void(0);">您好，admin</a>
                        <div class="drop mUser">
                            <a href="manager.php?rec=edit&id=1">编辑我的个人资料</a>
                            <a href="manager.php?rec=cloud_account">设置云账户</a>
                        </div>
                    </li>
                    <li class="noRight"><a href="login.php?rec=logout">退出</a></li>
                </ul>
            </div>
        </div>
    </div>
    <!-- dcHead 结束 --> <div id="dcLeft"><div id="menu">
    <ul class="top">
        <li><a href="index.jsp"><i class="home"></i><em>管理首页</em></a></li>
    </ul>
    <ul>
        <li><a href="password.jsp"><i class="system"></i><em>修改密码</em></a></li>
        <li><a href="list.jsp"><i class="nav"></i><em>快递管理</em></a></li>

    </ul>
</div></div>
    <div id="dcMain">
        <!-- 当前位置 -->
        <div id="urHere">DouPHP 管理中心<b>></b><strong>快递列表</strong> </div>   <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
        <h3><a href="show" class="actionBtn add">添加快递</a>快递列表</h3>
        <div class="filter">
        </div>
        <div id="list">

            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                <tr>
                    <th width="40" align="center">编号</th>
                    <th width="80" align="center">物流公司</th>
                    <th width="80" align="center">收件人</th>
                    <th width="80" align="center">手机号</th>
                    <th width="80" align="center">送达日期</th>
                    <th align="center">地址</th>
                    <th width="80" align="center">签收状态</th>
                    <th width="80" align="center">操作</th>
                </tr>
                <c:forEach items="${detailsList}" var="details">
                    <tr>
                        <td align="center">${details.id}</td>
                        <td>${details.company.companyName}</td>
                        <td align="center">${details.addrName}</td>
                        <td align="center">${details.phone}</td>
                        <td align="center"><fmt:formatDate value="${details.date}" pattern="yyyy-MM-dd"/></td>
                        <td align="center">${details.address}</td>
                        <c:if test="${details.state==1}">
                            <td align="center">已签收</td>
                        </c:if>
                        <c:if test="${details.state==0}">
                            <td align="center">未签收</td>
                        </c:if>
                        <td align="center">
                            <a href="showDetails?id=${details.id}">编辑</a> | <a href="javascript:void(0)" onclick="del(${details.id},this)">删除</a>
                        </td>
                    </tr>

                </c:forEach>

            </table>


        </div>
        <div class="clear"></div>
        <div class="pager">
            <a href="showAll?pageIndex=1">第一页</a>
            <c:if test="${page.pageIndex>1}">
                <a href="showAll?pageIndex=${page.pageIndex-1}"> 上一页</a>
            </c:if>
            <c:if test="${page.pageIndex<page.totalPage}">
                <a href="showAll?pageIndex=${page.pageIndex+1}">下一页</a>
            </c:if>
            <a href="showAll?pageIndex=${page.totalPage}">最末页</a>
        </div>
    </div>
    </div>
    <div class="clear"></div>
    <div id="dcFooter">
        <div id="footer">
            <div class="line"></div>
            <ul>
                版权所有 © 2013-2015 漳州豆壳网络科技有限公司，并保留所有权利。
            </ul>
        </div>
    </div><!-- dcFooter 结束 -->
    <div class="clear"></div> </div>
<script type="text/javascript">

    onload = function()
    {
        document.forms['action'].reset();
    }

    function douAction()
    {
        var frm = document.forms['action'];

        frm.elements['new_cat_id'].style.display = frm.elements['action'].value == 'category_move' ? '' : 'none';
    }

    function del(id,a) {
        var bool=confirm('确认删除吗')
        if(bool){
            $.ajax({
                url:"delete",
                type:"post",
                data:"id="+id,
                success:function (msg) {
                    if(msg==1){
                        alert('删除成功')
                        $(a).parent().parent().remove();
                    }else {
                        alert('删除失败')
                    }
                }
            })
        }else {
        }

    }
</script>
</body>
</html>